package com.zxl.support;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 有向图的节点类
 *
 * @author zhaoxl
 * @date 2024/07/31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DirectedGraphNode {

    /**
     * 节点唯一的ID
     */
    int id;

    /**
     * 邻接列表来存储其后继节点
     */
    List<Integer> neighbors;

    DirectedGraphNode(int id) {
        this.id = id;
        this.neighbors = new ArrayList<>();
    }
}
